
/**
 * Project Name:cats-core-impl
 * File Name:RoleSpec.java
 * Package Name:com.catsic.core.base.specification
 * Date:2014年4月29日上午11:14:29
 * Copyright (c) 2014, oa.catsic.com All Rights Reserved.
 */
 
package com.catsic.core.specification;

import com.catsic.base.conditon.Condition;
import com.catsic.base.specification.BaseSpec;
import com.catsic.base.specification.QueryWraper;
import com.catsic.core.conditon.RoleCondition;
import com.catsic.core.entity.Role;


/**
 * ClassName: RoleSpec
 * Description: 角色查询动态类
 * date: 2014年4月29日 上午11:14:29
 * author: yangyd
 */
public class RoleSpec extends BaseSpec<Role> {

	public RoleSpec(Condition condition) {
		super(condition);
	}
	
	/**
	 * @see com.catsic.core.specification.BaseSpec#addCondition(com.catsic.core.specification.QueryWraper)
	 */
	@Override
	protected void addCondition(QueryWraper<Role> queryWraper) {
		RoleCondition condition = (RoleCondition)getCondition();
		addEqualCondition(queryWraper, queryWraper.getRoot().get("organ").get("id"), condition.getOrganId());
		
	}

}
